<?php

/*

Search Shops (search_shops.php)

*/

$page_title = "Search Shops";
$rank_check = 1;
include "header.inc.php";

$findQuest = fetch("SELECT * FROM quests WHERE game = '$game' AND user = '$userid'");
if ($findQuest[id])
{
	die("$openHTML<p>Sorry, <a href=http://www.fanta.dk/showmovie.asp?mid=51866C59-BEEF-4F9E-9B3D-60989E2E736A>search shops is disabled</a> while you are in a <a href=quests.php?game=$game>quest</a>!</p>$closeHTML");
}

print "$openHTML";

$findPage = fetch("SELECT * FROM game_pages WHERE page_title = '$page_title' AND game = '$game'");
if (!$findPage[id])
{
	print "<P>Looking for a specific item? Can't find it in the <a href=shops.php?game=$game>Official Shops</a>? Then you're at the right place, here you can search all the user shops out there for any item you want! You can set the item you look for and you can even look for similar terms! I hope you find what you're looking for!</p><p>Be sure to check the <a href=notices.php?game=$game>notice boards</a> for some good shops to visit!</p>";
}
else
{
	print "$findPage[page_info]";
}
ECHO <<<END

<P><FORM ACTION="search_shops.pro.php?game=$game" METHOD=GET>
<input type=hidden name=game value=$game>
   <CENTER><BR>
   <TABLE BGCOLOR="$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=450>
      <TR BGCOLOR="$topAndBottomBG">
         <TD WIDTH=100 HEIGHT=50>
            <CENTER class=white><FONT SIZE="+2" COLOR="$topAndBottomText"><B>--Search
            Shops--</B></FONT></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$maincellColor">
         <TD WIDTH=100 HEIGHT=25>
            <CENTER>Search shops for anything:</CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=100 HEIGHT=25>
            <CENTER><SELECT NAME=search_type>
               <OPTION VALUE="contain">CONTAINING the words
               <OPTION VALUE="exact">with the EXACT words
            </SELECT></CENTER>
         </TD>
      </TR>
      <TR>
         <TD WIDTH=100 HEIGHT=25 BGCOLOR="$maincellColor">
            <CENTER><INPUT TYPE=text NAME="search_for" VALUE="" SIZE=38></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=100>
            <CENTER><INPUT TYPE=submit VALUE="Search Shops!"></CENTER>
         </TD>
      </TR>
   </TABLE>
   </CENTER>
</FORM></P>

END;

print "$closeHTML";
?>